{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Multimedia Security Experiment 8\n"
     ]
    }
   ],
   "source": [
    "print(\"Multimedia Security Experiment 8\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import myipf # 前面的实验编写的函数\n",
    "from matplotlib.gridspec import GridSpec\n",
    "#from mpl_toolkits.mplot3d.axes3d import Axes3D\n",
    "\n",
    "%matplotlib inline\n",
    "plt.rcParams[\"font.sans-serif\"] = [\"SimHei\"] # 用来正常显示中文\n",
    "plt.rcParams[\"axes.unicode_minus\"]=False # 用来正常显示负号\n",
    "%config InlineBackend.figure_format = \"svg\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "img = plt.imread(\"standard_test_images/cameraman.tif\");"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 全局阈值分割"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "130 128\n",
      "87.84322939930414 130\n",
      "70.58138662836659 87.84322939930414\n",
      "68.99649914537899 70.58138662836659\n",
      "68.81296345082117 68.99649914537899\n"
     ]
    }
   ],
   "source": [
    "gts = globalThresholdSegmentation(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7fe3e3289990>"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Created with matplotlib (https://matplotlib.org/) -->\n",
       "<svg height=\"250.190156pt\" version=\"1.1\" viewBox=\"0 0 256.456094 250.190156\" width=\"256.456094pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       " <defs>\n",
       "  <style type=\"text/css\">\n",
       "*{stroke-linecap:butt;stroke-linejoin:round;}\n",
       "  </style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 250.190156 \n",
       "L 256.456094 250.190156 \n",
       "L 256.456094 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill:none;\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 29.2 227.865156 \n",
       "L 246.64 227.865156 \n",
       "L 246.64 10.425156 \n",
       "L 29.2 10.425156 \n",
       "z\n",
       "\" style=\"fill:#ffffff;\"/>\n",
       "   </g>\n",
       "   <g clip-path=\"url(#pc419919277)\">\n",
       "    <image height=\"218\" id=\"image9ec89fbba5\" transform=\"scale(1 -1)translate(0 -218)\" width=\"218\" x=\"29.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAANoAAADaCAYAAADAHVzbAAAABHNCSVQICAgIfAhkiAAACo1JREFUeJzt3dl24yoURVF8R/7/l32fGFEpamgOp2PNp1TFsWXEBoQk9Pl+v9+i6PP5TP392+a+vX/9++Prvt/vn3/3qn+vXJzbiF6+/1lvgIXZsAO9tgzamWTwCPE6UXuzUjYL2nGIWHfa9/v9swMJiy+e90frtoUK2myLdiyU+vPn8/lTWCOfE7m1jcBr+bZuV6igafHcgiKmUEHrDcDVsFCjZSSocj6fj9verMeP9geep9K1PU3jExCsEqpHK6U/DE+vvzpmgx+Z9km4oLVqHW5cTY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aoICgAQoIGqCAoAEKCBqggKABCggaoICgAQoIGqCAoAEKCBqggKABCv4HsLPOGukcEgsAAAAASUVORK5CYII=\" y=\"-9.865156\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" id=\"m160aa5f09b\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.412344\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0 -->\n",
       "      <defs>\n",
       "       <path d=\"M 3.125 29.296875 \n",
       "Q 3.90625 50 6.4375 56.046875 \n",
       "Q 8.984375 62.109375 13.671875 66.015625 \n",
       "Q 18.359375 69.921875 25.1875 69.921875 \n",
       "Q 32.03125 69.921875 37.109375 64.25 \n",
       "Q 42.1875 58.59375 43.75 50 \n",
       "Q 45.3125 41.40625 44.71875 30.265625 \n",
       "Q 44.140625 19.140625 40.8125 12.109375 \n",
       "Q 37.5 5.078125 30.859375 2.34375 \n",
       "Q 24.21875 -0.390625 17.578125 2.921875 \n",
       "Q 10.9375 6.25 8.203125 11.71875 \n",
       "Q 5.46875 17.1875 4.296875 23.234375 \n",
       "Q 3.125 29.296875 3.90625 50 \n",
       "z\n",
       "M 12.890625 52.734375 \n",
       "Q 10.546875 31.25 12.5 22.84375 \n",
       "Q 14.453125 14.453125 18.9375 10.9375 \n",
       "Q 23.4375 7.421875 28.125 9.5625 \n",
       "Q 32.8125 11.71875 34.953125 18.15625 \n",
       "Q 37.109375 24.609375 37.109375 32.21875 \n",
       "Q 37.109375 39.84375 36.515625 46.09375 \n",
       "Q 35.9375 52.34375 33 57.421875 \n",
       "Q 30.078125 62.5 25.1875 62.6875 \n",
       "Q 20.3125 62.890625 16.59375 57.8125 \n",
       "Q 12.890625 52.734375 10.546875 31.25 \n",
       "z\n",
       "\" id=\"SimHei-48\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(26.912344 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"71.881094\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 100 -->\n",
       "      <defs>\n",
       "       <path d=\"M 21.875 56.25 \n",
       "Q 16.796875 51.171875 8.984375 46.484375 \n",
       "L 8.984375 53.90625 \n",
       "Q 18.75 60.546875 25 69.53125 \n",
       "L 29.6875 69.53125 \n",
       "L 29.6875 2.34375 \n",
       "L 21.875 2.34375 \n",
       "z\n",
       "\" id=\"SimHei-49\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(64.381094 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-49\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"114.349844\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 200 -->\n",
       "      <defs>\n",
       "       <path d=\"M 4.6875 3.90625 \n",
       "Q 5.078125 9.765625 10.15625 14.453125 \n",
       "Q 15.234375 19.140625 23.046875 29.09375 \n",
       "Q 30.859375 39.0625 33.203125 44.53125 \n",
       "Q 35.546875 50 34.953125 53.90625 \n",
       "Q 34.375 57.8125 31.25 60.34375 \n",
       "Q 28.125 62.890625 24.015625 62.5 \n",
       "Q 19.921875 62.109375 16.203125 59.375 \n",
       "Q 12.5 56.640625 10.546875 51.171875 \n",
       "L 3.125 52.34375 \n",
       "Q 6.25 61.328125 11.125 65.421875 \n",
       "Q 16.015625 69.53125 22.65625 69.921875 \n",
       "Q 26.5625 70.3125 29.6875 69.71875 \n",
       "Q 32.8125 69.140625 36.125 66.984375 \n",
       "Q 39.453125 64.84375 41.59375 60.546875 \n",
       "Q 43.75 56.25 43.15625 50.1875 \n",
       "Q 42.578125 44.140625 37.109375 35.734375 \n",
       "Q 31.640625 27.34375 16.015625 9.375 \n",
       "L 44.140625 9.375 \n",
       "L 44.140625 2.34375 \n",
       "L 4.6875 2.34375 \n",
       "z\n",
       "\" id=\"SimHei-50\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(106.849844 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-50\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"156.818594\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 300 -->\n",
       "      <defs>\n",
       "       <path d=\"M 3.90625 19.140625 \n",
       "L 10.9375 20.3125 \n",
       "Q 12.5 15.234375 16.015625 11.90625 \n",
       "Q 19.53125 8.59375 24.796875 8.78125 \n",
       "Q 30.078125 8.984375 33.203125 13.078125 \n",
       "Q 36.328125 17.1875 35.9375 22.453125 \n",
       "Q 35.546875 27.734375 31.828125 30.65625 \n",
       "Q 28.125 33.59375 19.921875 34.765625 \n",
       "L 19.921875 39.84375 \n",
       "Q 28.125 40.625 31.828125 44.140625 \n",
       "Q 35.546875 47.65625 35.15625 53.3125 \n",
       "Q 34.765625 58.984375 30.078125 61.515625 \n",
       "Q 25.390625 64.0625 20.109375 62.109375 \n",
       "Q 14.84375 60.15625 11.71875 51.171875 \n",
       "L 4.6875 52.34375 \n",
       "Q 7.03125 59.375 11.125 64.0625 \n",
       "Q 15.234375 68.75 22.265625 69.53125 \n",
       "Q 29.296875 70.3125 34.5625 67.765625 \n",
       "Q 39.84375 65.234375 41.984375 59.953125 \n",
       "Q 44.140625 54.6875 42.578125 48.4375 \n",
       "Q 41.015625 42.1875 33.59375 37.5 \n",
       "Q 39.0625 35.15625 41.984375 30.46875 \n",
       "Q 44.921875 25.78125 43.9375 18.15625 \n",
       "Q 42.96875 10.546875 37.109375 5.859375 \n",
       "Q 31.25 1.171875 23.828125 1.359375 \n",
       "Q 16.40625 1.5625 10.9375 6.046875 \n",
       "Q 5.46875 10.546875 3.90625 19.140625 \n",
       "z\n",
       "\" id=\"SimHei-51\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(149.318594 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-51\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"199.287344\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 400 -->\n",
       "      <defs>\n",
       "       <path d=\"M 31.25 17.1875 \n",
       "L 1.171875 17.1875 \n",
       "L 1.171875 23.828125 \n",
       "L 32.8125 69.53125 \n",
       "L 38.671875 69.53125 \n",
       "L 38.671875 23.828125 \n",
       "L 48.046875 23.828125 \n",
       "L 48.046875 17.1875 \n",
       "L 38.671875 17.1875 \n",
       "L 38.671875 2.34375 \n",
       "L 31.25 2.34375 \n",
       "z\n",
       "M 31.25 23.828125 \n",
       "L 31.25 54.6875 \n",
       "L 9.375 23.828125 \n",
       "z\n",
       "\" id=\"SimHei-52\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(191.787344 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-52\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_6\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"241.756094\" xlink:href=\"#m160aa5f09b\" y=\"227.865156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 500 -->\n",
       "      <defs>\n",
       "       <path d=\"M 8.59375 20.703125 \n",
       "Q 11.328125 10.15625 17.96875 8.984375 \n",
       "Q 24.609375 7.8125 28.703125 10.34375 \n",
       "Q 32.8125 12.890625 34.5625 16.984375 \n",
       "Q 36.328125 21.09375 36.125 26.171875 \n",
       "Q 35.9375 31.25 33.390625 34.765625 \n",
       "Q 30.859375 38.28125 26.953125 39.453125 \n",
       "Q 23.046875 40.625 18.15625 39.453125 \n",
       "Q 13.28125 38.28125 10.15625 33.984375 \n",
       "L 3.515625 34.765625 \n",
       "Q 4.296875 37.109375 10.9375 68.359375 \n",
       "L 41.796875 68.359375 \n",
       "L 41.796875 61.328125 \n",
       "L 16.796875 61.328125 \n",
       "Q 14.84375 50.78125 12.890625 44.53125 \n",
       "Q 18.75 47.265625 23.828125 47.0625 \n",
       "Q 28.90625 46.875 33.59375 44.71875 \n",
       "Q 38.28125 42.578125 40.421875 38.859375 \n",
       "Q 42.578125 35.15625 43.546875 31.4375 \n",
       "Q 44.53125 27.734375 44.328125 23.4375 \n",
       "Q 44.140625 19.140625 42.578125 14.640625 \n",
       "Q 41.015625 10.15625 37.890625 7.21875 \n",
       "Q 34.765625 4.296875 30.265625 2.53125 \n",
       "Q 25.78125 0.78125 19.921875 1.171875 \n",
       "Q 14.0625 1.5625 8.78125 5.46875 \n",
       "Q 3.515625 9.375 1.5625 18.75 \n",
       "z\n",
       "\" id=\"SimHei-53\"/>\n",
       "      </defs>\n",
       "      <g transform=\"translate(234.256094 241.740156)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-53\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <defs>\n",
       "       <path d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" id=\"m53f8e8929e\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"10.6375\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(17.2 14.075)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"53.10625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 100 -->\n",
       "      <g transform=\"translate(7.2 56.54375)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-49\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"95.575\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 200 -->\n",
       "      <g transform=\"translate(7.2 99.0125)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-50\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"138.04375\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 300 -->\n",
       "      <g transform=\"translate(7.2 141.48125)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-51\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"180.5125\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 400 -->\n",
       "      <g transform=\"translate(7.2 183.95)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-52\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"29.2\" xlink:href=\"#m53f8e8929e\" y=\"222.98125\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 500 -->\n",
       "      <g transform=\"translate(7.2 226.41875)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#SimHei-53\"/>\n",
       "       <use x=\"50\" xlink:href=\"#SimHei-48\"/>\n",
       "       <use x=\"100\" xlink:href=\"#SimHei-48\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 29.2 227.865156 \n",
       "L 29.2 10.425156 \n",
       "\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 246.64 227.865156 \n",
       "L 246.64 10.425156 \n",
       "\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 29.2 227.865156 \n",
       "L 246.64 227.865156 \n",
       "\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 29.2 10.425156 \n",
       "L 246.64 10.425156 \n",
       "\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pc419919277\">\n",
       "   <rect height=\"217.44\" width=\"217.44\" x=\"29.2\" y=\"10.425156\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.imshow(gts, cmap=\"gray\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Created with matplotlib (https://matplotlib.org/) -->\n",
       "<svg height=\"247.4025pt\" version=\"1.1\" viewBox=\"0 0 295.854545 247.4025\" width=\"295.854545pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       " <defs>\n",
       "  <style type=\"text/css\">\n",
       "*{stroke-linecap:butt;stroke-linejoin:round;}\n",
       "  </style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 247.4025 \n",
       "L 295.854545 247.4025 \n",
       "L 295.854545 0 \n",
       "L 0 0 \n",
       "z\n",
       "\" style=\"fill:none;\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g clip-path=\"url(#p245a1146dc)\">\n",
       "    <image height=\"99\" id=\"image821975b166\" transform=\"scale(1 -1)translate(0 -99)\" width=\"99\" x=\"7.2\" xlink:href=\"data:image/png;base64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uBbDd4vwAAAABJRU5ErkJggg==\" y=\"-22.598864\"/>\n",
       "   </g>\n",
       "   <g id=\"text_1\">\n",
       "    <!-- 阈值：130 -->\n",
       "    <defs>\n",
       "     <path d=\"M 81.640625 12.890625 \n",
       "Q 76.953125 1.171875 72.0625 2.34375 \n",
       "Q 67.1875 3.515625 62.109375 12.5 \n",
       "Q 60.15625 9.375 57.609375 5.65625 \n",
       "Q 55.078125 1.953125 51.953125 -1.5625 \n",
       "Q 49.21875 0.78125 44.921875 2.734375 \n",
       "Q 49.21875 6.640625 52.140625 10.734375 \n",
       "Q 55.078125 14.84375 57.8125 19.53125 \n",
       "Q 55.078125 27.34375 53.703125 32.609375 \n",
       "Q 52.34375 37.890625 51.5625 49.609375 \n",
       "L 29.6875 49.609375 \n",
       "Q 26.171875 49.609375 21.09375 49.21875 \n",
       "L 21.09375 55.46875 \n",
       "Q 26.171875 55.078125 29.6875 55.078125 \n",
       "L 51.5625 55.078125 \n",
       "Q 50.78125 62.890625 50.390625 67.1875 \n",
       "Q 53.515625 66.796875 58.984375 66.796875 \n",
       "Q 58.59375 60.15625 58.59375 55.078125 \n",
       "L 69.140625 55.078125 \n",
       "Q 73.046875 55.078125 79.296875 55.46875 \n",
       "L 79.296875 49.21875 \n",
       "Q 73.046875 49.609375 69.140625 49.609375 \n",
       "L 58.59375 49.609375 \n",
       "Q 58.59375 45.3125 59.5625 38.671875 \n",
       "Q 60.546875 32.03125 62.5 27.734375 \n",
       "Q 63.671875 30.859375 64.640625 34.953125 \n",
       "Q 65.625 39.0625 66.40625 45.703125 \n",
       "Q 73.046875 43.75 75.78125 42.578125 \n",
       "Q 73.4375 39.84375 71.28125 33 \n",
       "Q 69.140625 26.171875 66.015625 18.75 \n",
       "Q 67.96875 14.84375 70.890625 12.296875 \n",
       "Q 73.828125 9.765625 75.78125 17.1875 \n",
       "Q 79.296875 14.453125 81.640625 12.890625 \n",
       "z\n",
       "M 92.1875 76.171875 \n",
       "Q 91.796875 68.75 91.796875 59.765625 \n",
       "L 91.796875 1.5625 \n",
       "Q 91.796875 -6.25 86.71875 -7.421875 \n",
       "Q 81.640625 -8.59375 75.78125 -9.765625 \n",
       "Q 74.21875 -5.46875 71.484375 -0.78125 \n",
       "Q 80.46875 -1.171875 82.8125 -0.78125 \n",
       "Q 85.15625 -0.390625 85.15625 4.6875 \n",
       "L 85.15625 70.3125 \n",
       "L 56.25 70.3125 \n",
       "Q 47.65625 70.3125 37.5 69.921875 \n",
       "L 37.5 76.5625 \n",
       "Q 47.65625 76.171875 55.46875 76.171875 \n",
       "z\n",
       "M 47.65625 42.578125 \n",
       "Q 46.484375 38.28125 46.484375 34.375 \n",
       "L 46.484375 20.3125 \n",
       "L 22.65625 20.3125 \n",
       "Q 23.046875 24.21875 23.046875 26.953125 \n",
       "L 23.046875 34.375 \n",
       "Q 23.046875 37.890625 22.65625 42.578125 \n",
       "L 47.65625 42.578125 \n",
       "z\n",
       "M 16.796875 60.15625 \n",
       "Q 16.40625 54.296875 16.40625 48.4375 \n",
       "L 16.40625 -8.984375 \n",
       "L 8.59375 -8.984375 \n",
       "Q 9.375 1.5625 9.375 9.765625 \n",
       "L 9.375 46.484375 \n",
       "Q 9.375 54.6875 8.59375 60.15625 \n",
       "L 16.796875 60.15625 \n",
       "z\n",
       "M 48.4375 16.40625 \n",
       "Q 48.046875 12.109375 48.4375 10.15625 \n",
       "Q 43.359375 8.984375 34.375 7.03125 \n",
       "Q 25.390625 5.078125 20.703125 3.125 \n",
       "Q 18.75 7.421875 17.578125 11.328125 \n",
       "Q 22.265625 11.71875 31.046875 13.28125 \n",
       "Q 39.84375 14.84375 48.4375 16.40625 \n",
       "z\n",
       "M 21.484375 82.421875 \n",
       "Q 25.78125 76.5625 30.859375 68.359375 \n",
       "Q 26.953125 66.015625 23.046875 64.0625 \n",
       "Q 18.75 72.265625 14.0625 78.125 \n",
       "Q 17.96875 81.25 21.484375 82.421875 \n",
       "z\n",
       "M 39.84375 26.171875 \n",
       "L 39.84375 36.71875 \n",
       "L 29.6875 36.71875 \n",
       "L 29.6875 26.171875 \n",
       "z\n",
       "M 70.3125 68.75 \n",
       "Q 72.265625 64.84375 75 60.546875 \n",
       "Q 72.265625 59.375 67.96875 57.03125 \n",
       "Q 66.015625 61.328125 63.671875 65.234375 \n",
       "Q 67.578125 67.96875 70.3125 68.75 \n",
       "z\n",
       "\" id=\"SimHei-38408\"/>\n",
       "     <path d=\"M 57.421875 69.53125 \n",
       "L 57.421875 79.6875 \n",
       "Q 62.109375 79.296875 67.96875 78.90625 \n",
       "Q 66.015625 76.171875 65.625 69.53125 \n",
       "L 80.078125 69.53125 \n",
       "Q 86.71875 69.53125 91.796875 69.921875 \n",
       "L 91.796875 62.890625 \n",
       "Q 86.328125 63.28125 80.078125 63.28125 \n",
       "L 65.234375 63.28125 \n",
       "L 64.453125 54.6875 \n",
       "L 84.375 54.6875 \n",
       "Q 83.984375 50 83.984375 42.1875 \n",
       "L 83.984375 2.34375 \n",
       "Q 91.796875 2.34375 95.3125 2.734375 \n",
       "L 95.3125 -4.296875 \n",
       "Q 90.234375 -3.90625 81.25 -3.90625 \n",
       "L 44.53125 -3.90625 \n",
       "Q 35.546875 -3.90625 29.6875 -4.296875 \n",
       "L 29.6875 2.734375 \n",
       "Q 33.203125 2.34375 40.625 2.34375 \n",
       "L 40.625 42.1875 \n",
       "Q 40.625 49.609375 40.234375 54.6875 \n",
       "L 56.25 54.6875 \n",
       "L 57.03125 63.28125 \n",
       "L 50 63.28125 \n",
       "Q 40.234375 63.28125 34.765625 62.890625 \n",
       "L 34.765625 69.921875 \n",
       "Q 39.84375 69.53125 50 69.53125 \n",
       "z\n",
       "M 34.765625 76.5625 \n",
       "Q 31.640625 73.046875 25.78125 58.59375 \n",
       "L 25.78125 7.03125 \n",
       "Q 25.78125 -1.171875 26.171875 -8.59375 \n",
       "L 17.96875 -8.59375 \n",
       "Q 18.359375 -1.953125 18.359375 5.859375 \n",
       "L 18.359375 46.09375 \n",
       "Q 13.671875 38.28125 9.765625 33.59375 \n",
       "Q 6.640625 37.890625 3.90625 40.234375 \n",
       "Q 7.8125 44.140625 14.640625 55.265625 \n",
       "Q 21.484375 66.40625 25.390625 80.46875 \n",
       "Q 30.859375 77.734375 34.765625 76.5625 \n",
       "z\n",
       "M 76.953125 41.40625 \n",
       "L 76.953125 49.21875 \n",
       "L 48.046875 49.21875 \n",
       "L 48.046875 41.40625 \n",
       "z\n",
       "M 76.953125 2.34375 \n",
       "L 76.953125 9.765625 \n",
       "L 48.046875 9.765625 \n",
       "L 48.046875 2.34375 \n",
       "z\n",
       "M 76.953125 15.625 \n",
       "L 76.953125 22.65625 \n",
       "L 48.046875 22.65625 \n",
       "L 48.046875 15.625 \n",
       "z\n",
       "M 76.953125 28.515625 \n",
       "L 76.953125 35.546875 \n",
       "L 48.046875 35.546875 \n",
       "L 48.046875 28.515625 \n",
       "z\n",
       "\" id=\"SimHei-20540\"/>\n",
       "     <path d=\"M 18.75 37.890625 \n",
       "L 31.640625 37.890625 \n",
       "L 31.640625 25 \n",
       "L 18.75 25 \n",
       "z\n",
       "M 18.75 12.890625 \n",
       "L 31.640625 12.890625 \n",
       "L 31.640625 0 \n",
       "L 18.75 0 \n",
       "z\n",
       "\" id=\"SimHei-65306\"/>\n",
       "     <path d=\"M 21.875 56.25 \n",
       "Q 16.796875 51.171875 8.984375 46.484375 \n",
       "L 8.984375 53.90625 \n",
       "Q 18.75 60.546875 25 69.53125 \n",
       "L 29.6875 69.53125 \n",
       "L 29.6875 2.34375 \n",
       "L 21.875 2.34375 \n",
       "z\n",
       "\" id=\"SimHei-49\"/>\n",
       "     <path d=\"M 3.90625 19.140625 \n",
       "L 10.9375 20.3125 \n",
       "Q 12.5 15.234375 16.015625 11.90625 \n",
       "Q 19.53125 8.59375 24.796875 8.78125 \n",
       "Q 30.078125 8.984375 33.203125 13.078125 \n",
       "Q 36.328125 17.1875 35.9375 22.453125 \n",
       "Q 35.546875 27.734375 31.828125 30.65625 \n",
       "Q 28.125 33.59375 19.921875 34.765625 \n",
       "L 19.921875 39.84375 \n",
       "Q 28.125 40.625 31.828125 44.140625 \n",
       "Q 35.546875 47.65625 35.15625 53.3125 \n",
       "Q 34.765625 58.984375 30.078125 61.515625 \n",
       "Q 25.390625 64.0625 20.109375 62.109375 \n",
       "Q 14.84375 60.15625 11.71875 51.171875 \n",
       "L 4.6875 52.34375 \n",
       "Q 7.03125 59.375 11.125 64.0625 \n",
       "Q 15.234375 68.75 22.265625 69.53125 \n",
       "Q 29.296875 70.3125 34.5625 67.765625 \n",
       "Q 39.84375 65.234375 41.984375 59.953125 \n",
       "Q 44.140625 54.6875 42.578125 48.4375 \n",
       "Q 41.015625 42.1875 33.59375 37.5 \n",
       "Q 39.0625 35.15625 41.984375 30.46875 \n",
       "Q 44.921875 25.78125 43.9375 18.15625 \n",
       "Q 42.96875 10.546875 37.109375 5.859375 \n",
       "Q 31.25 1.171875 23.828125 1.359375 \n",
       "Q 16.40625 1.5625 10.9375 6.046875 \n",
       "Q 5.46875 10.546875 3.90625 19.140625 \n",
       "z\n",
       "\" id=\"SimHei-51\"/>\n",
       "     <path d=\"M 3.125 29.296875 \n",
       "Q 3.90625 50 6.4375 56.046875 \n",
       "Q 8.984375 62.109375 13.671875 66.015625 \n",
       "Q 18.359375 69.921875 25.1875 69.921875 \n",
       "Q 32.03125 69.921875 37.109375 64.25 \n",
       "Q 42.1875 58.59375 43.75 50 \n",
       "Q 45.3125 41.40625 44.71875 30.265625 \n",
       "Q 44.140625 19.140625 40.8125 12.109375 \n",
       "Q 37.5 5.078125 30.859375 2.34375 \n",
       "Q 24.21875 -0.390625 17.578125 2.921875 \n",
       "Q 10.9375 6.25 8.203125 11.71875 \n",
       "Q 5.46875 17.1875 4.296875 23.234375 \n",
       "Q 3.125 29.296875 3.90625 50 \n",
       "z\n",
       "M 12.890625 52.734375 \n",
       "Q 10.546875 31.25 12.5 22.84375 \n",
       "Q 14.453125 14.453125 18.9375 10.9375 \n",
       "Q 23.4375 7.421875 28.125 9.5625 \n",
       "Q 32.8125 11.71875 34.953125 18.15625 \n",
       "Q 37.109375 24.609375 37.109375 32.21875 \n",
       "Q 37.109375 39.84375 36.515625 46.09375 \n",
       "Q 35.9375 52.34375 33 57.421875 \n",
       "Q 30.078125 62.5 25.1875 62.6875 \n",
       "Q 20.3125 62.890625 16.59375 57.8125 \n",
       "Q 12.890625 52.734375 10.546875 31.25 \n",
       "z\n",
       "\" id=\"SimHei-48\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(29.618182 16.7625)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-38408\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-20540\"/>\n",
       "     <use x=\"200\" xlink:href=\"#SimHei-65306\"/>\n",
       "     <use x=\"300\" xlink:href=\"#SimHei-49\"/>\n",
       "     <use x=\"350\" xlink:href=\"#SimHei-51\"/>\n",
       "     <use x=\"400\" xlink:href=\"#SimHei-48\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_2\">\n",
       "   <g clip-path=\"url(#p3aa2348c78)\">\n",
       "    <image height=\"99\" id=\"image9f0b1f2f56\" transform=\"scale(1 -1)translate(0 -99)\" width=\"99\" x=\"189.818182\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAYAAACPO76VAAAABHNCSVQICAgIfAhkiAAABE9JREFUeJztnNsaoiEIRfn7ev9Xdq6ccQwFFWVTrssyT1vAY09KKdEgz/M0v6uz66Xl0uffSNXSpLGkLI8r26I+r6VfO3JSCE15ve+5Acl9BilGSkm0KE9GB0KZPreLy+NVJrjIrPZVT8iXlGCUE8J6DZ7RuKB1T5mtbmpXp52OF7Nw9RQtA5Vvcp+atkCLgcTq1FXz2y1iWIzoKK7IkmsZCiwCtwZ3MbQV94wfK+uKEdzFkHiexz2Q7yj/6ArcuwOtyO2wbk9zBY5KWWHvgH6ifEgxWqNQGp3Wo/e0dX+IgeBepB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EVY4ToImSgxdB08rcIQRRgnfFNnS0BbRm/xhUDiCsGEFcMIK4YQFwxgLhiAHHFAOKKAcQVA4grBhBXDCCuGEBcMYD4A4lfvr4M6oJNAAAAAElFTkSuQmCC\" y=\"-22.598864\"/>\n",
       "   </g>\n",
       "   <g id=\"text_2\">\n",
       "    <!-- 阈值：87 -->\n",
       "    <defs>\n",
       "     <path d=\"M 2.734375 16.796875 \n",
       "Q 2.734375 26.171875 5.078125 30.65625 \n",
       "Q 7.421875 35.15625 12.890625 37.890625 \n",
       "Q 8.203125 40.625 6.640625 43.9375 \n",
       "Q 5.078125 47.265625 4.875 51.5625 \n",
       "Q 4.6875 55.859375 6.046875 58.984375 \n",
       "Q 7.421875 62.109375 10.15625 64.84375 \n",
       "Q 12.890625 67.578125 16.203125 68.546875 \n",
       "Q 19.53125 69.53125 23.4375 69.53125 \n",
       "Q 27.34375 69.53125 30.46875 68.75 \n",
       "Q 33.59375 67.96875 37.109375 65.421875 \n",
       "Q 40.625 62.890625 42.1875 58.203125 \n",
       "Q 43.75 53.515625 41.984375 47.265625 \n",
       "Q 40.234375 41.015625 32.8125 37.5 \n",
       "Q 39.453125 35.546875 42.1875 31.4375 \n",
       "Q 44.921875 27.34375 44.921875 21.484375 \n",
       "Q 44.921875 15.625 43.15625 12.109375 \n",
       "Q 41.40625 8.59375 39.25 6.25 \n",
       "Q 37.109375 3.90625 33.390625 2.53125 \n",
       "Q 29.6875 1.171875 24.015625 1.171875 \n",
       "Q 18.359375 1.171875 14.25 2.53125 \n",
       "Q 10.15625 3.90625 7.421875 6.640625 \n",
       "Q 4.6875 9.375 3.703125 13.078125 \n",
       "Q 2.734375 16.796875 2.734375 26.171875 \n",
       "z\n",
       "M 10.9375 26.5625 \n",
       "Q 10.546875 17.1875 12.296875 13.671875 \n",
       "Q 14.0625 10.15625 18.75 9.171875 \n",
       "Q 23.4375 8.203125 28.515625 9.375 \n",
       "Q 33.59375 10.546875 35.546875 14.84375 \n",
       "Q 37.5 19.140625 36.90625 23.4375 \n",
       "Q 36.328125 27.734375 32.03125 30.65625 \n",
       "Q 27.734375 33.59375 22.65625 33.203125 \n",
       "Q 17.578125 32.8125 14.25 29.6875 \n",
       "Q 10.9375 26.5625 10.546875 17.1875 \n",
       "z\n",
       "M 12.109375 56.25 \n",
       "Q 12.109375 48.4375 14.84375 44.921875 \n",
       "Q 17.578125 41.40625 23.4375 41.40625 \n",
       "Q 29.296875 41.40625 32.21875 44.921875 \n",
       "Q 35.15625 48.4375 34.953125 53.3125 \n",
       "Q 34.765625 58.203125 31.4375 60.546875 \n",
       "Q 28.125 62.890625 22.453125 62.5 \n",
       "Q 16.796875 62.109375 14.453125 59.171875 \n",
       "Q 12.109375 56.25 12.109375 48.4375 \n",
       "z\n",
       "\" id=\"SimHei-56\"/>\n",
       "     <path d=\"M 13.28125 2.34375 \n",
       "Q 20.3125 32.03125 37.890625 61.328125 \n",
       "L 4.296875 61.328125 \n",
       "L 4.296875 68.359375 \n",
       "L 46.09375 68.359375 \n",
       "L 46.09375 61.71875 \n",
       "Q 27.734375 32.03125 21.875 2.34375 \n",
       "L 13.28125 2.34375 \n",
       "z\n",
       "\" id=\"SimHei-55\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(215.236364 16.7625)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-38408\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-20540\"/>\n",
       "     <use x=\"200\" xlink:href=\"#SimHei-65306\"/>\n",
       "     <use x=\"300\" xlink:href=\"#SimHei-56\"/>\n",
       "     <use x=\"350\" xlink:href=\"#SimHei-55\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_3\">\n",
       "   <g clip-path=\"url(#p89a7998a08)\">\n",
       "    <image height=\"99\" id=\"imagea1a653f722\" transform=\"scale(1 -1)translate(0 -99)\" width=\"99\" x=\"7.2\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgA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S0iTHsFReMzM0Ur79LS6JaLrDOtB7qxBUIUgUlhn7BzRl2irt7sXJZeIhql/jR8aYabYt/Lq2rpyhuItqmIQydyRq7WzUpUd3eFDEUO9NqUx0LddBchAFwozKyGF72VY30g6xeU/wJqhd8O19tle7oiyIFTPGSvsxn3+72cFQwQqTPVCyWgnb7eyiwSUGER7R/0jzPoZ4DeXONw7yiQd/cwUURAxaobmV8IQF3A7wIUporOvnYgMpBjfyhUDCFgxJL5qKBqwYqwQXYQMtBgaX9aFDPyr7ZuMPQLaM76NKwYQVwwgrhhAXDGAuGIAccUA4ooBxBUDiCsGEFcMIK4YQFwxgLhiAPELja9EBozydNoAAAAASUVORK5CYII=\" y=\"-141.2025\"/>\n",
       "   </g>\n",
       "   <g id=\"text_3\">\n",
       "    <!-- 阈值：70 -->\n",
       "    <g transform=\"translate(32.618182 135.366136)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-38408\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-20540\"/>\n",
       "     <use x=\"200\" xlink:href=\"#SimHei-65306\"/>\n",
       "     <use x=\"300\" xlink:href=\"#SimHei-55\"/>\n",
       "     <use x=\"350\" xlink:href=\"#SimHei-48\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       "  <g id=\"axes_4\">\n",
       "   <g clip-path=\"url(#p0861ce8522)\">\n",
       "    <image height=\"99\" id=\"image19bc2a5f17\" transform=\"scale(1 -1)translate(0 -99)\" width=\"99\" x=\"189.818182\" xlink:href=\"data:image/png;base64,\n",
       "iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAYAAACPO76VAAAABHNCSVQICAgIfAhkiAAAA/pJREFUeJztnUmSIyEMRZUVvv+VqRURBGYQSiR9Yd6uXelk+BoY3U9KKdEiz/N0/1a/rnw2pfT17977BdUyQ6t+f9vfOCA3IjdkJOov8rEukCMAslcQ6dXPxDPqynMag+o1mvXaLkarsvVnqB3NQdNrTXNGdLSNSFWMyB7QQjuX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7qRc4XRMBirBBdhAy0GJxOPkUIogBD25M6ewa0Z/waVwwgrhhAXDGAuGIAccUA4ooBxBUDiCsGEFcMIK4YQFwxgLhiAHHFAOIfJZlD50Oc+OEAAAAASUVORK5CYII=\" y=\"-141.2025\"/>\n",
       "   </g>\n",
       "   <g id=\"text_4\">\n",
       "    <!-- 阈值：68 -->\n",
       "    <defs>\n",
       "     <path d=\"M 3.515625 19.53125 \n",
       "Q 4.296875 30.859375 6.046875 34.765625 \n",
       "Q 7.8125 38.671875 11.328125 44.53125 \n",
       "L 27.34375 69.53125 \n",
       "L 36.328125 69.53125 \n",
       "L 19.921875 43.75 \n",
       "Q 30.46875 46.484375 36.71875 42.96875 \n",
       "Q 42.96875 39.453125 45.109375 34.953125 \n",
       "Q 47.265625 30.46875 47.453125 25.1875 \n",
       "Q 47.65625 19.921875 45.890625 14.84375 \n",
       "Q 44.140625 9.765625 39.640625 5.65625 \n",
       "Q 35.15625 1.5625 27.140625 1.171875 \n",
       "Q 19.140625 0.78125 13.46875 4.09375 \n",
       "Q 7.8125 7.421875 5.65625 13.46875 \n",
       "Q 3.515625 19.53125 4.296875 30.859375 \n",
       "z\n",
       "M 12.5 16.015625 \n",
       "Q 19.53125 8.59375 25.390625 8.203125 \n",
       "Q 31.25 7.8125 35.15625 12.109375 \n",
       "Q 39.0625 16.40625 39.0625 24.609375 \n",
       "Q 39.0625 32.8125 34.171875 35.9375 \n",
       "Q 29.296875 39.0625 23.234375 38.28125 \n",
       "Q 17.1875 37.5 14.453125 32.421875 \n",
       "Q 11.71875 27.34375 12.109375 21.671875 \n",
       "Q 12.5 16.015625 19.53125 8.59375 \n",
       "z\n",
       "\" id=\"SimHei-54\"/>\n",
       "    </defs>\n",
       "    <g transform=\"translate(215.236364 135.366136)scale(0.12 -0.12)\">\n",
       "     <use xlink:href=\"#SimHei-38408\"/>\n",
       "     <use x=\"100\" xlink:href=\"#SimHei-20540\"/>\n",
       "     <use x=\"200\" xlink:href=\"#SimHei-65306\"/>\n",
       "     <use x=\"300\" xlink:href=\"#SimHei-54\"/>\n",
       "     <use x=\"350\" xlink:href=\"#SimHei-56\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p245a1146dc\">\n",
       "   <rect height=\"98.836364\" width=\"98.836364\" x=\"7.2\" y=\"22.7625\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p3aa2348c78\">\n",
       "   <rect height=\"98.836364\" width=\"98.836364\" x=\"189.818182\" y=\"22.7625\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p89a7998a08\">\n",
       "   <rect height=\"98.836364\" width=\"98.836364\" x=\"7.2\" y=\"141.366136\"/>\n",
       "  </clipPath>\n",
       "  <clipPath id=\"p0861ce8522\">\n",
       "   <rect height=\"98.836364\" width=\"98.836364\" x=\"189.818182\" y=\"141.366136\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 432x288 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "gts1 = globalThresholdSegmentation(img, 130)\n",
    "gts2 = globalThresholdSegmentation(img, 87)\n",
    "gts3 = globalThresholdSegmentation(img, 70)\n",
    "gts4 = globalThresholdSegmentation(img, 68)\n",
    "plt.subplot(221), plt.imshow(gts1, cmap=\"gray\"), plt.axis(\"off\"), plt.title(\"阈值：130\")\n",
    "plt.subplot(222), plt.imshow(gts2, cmap=\"gray\"), plt.axis(\"off\"), plt.title(\"阈值：87\")\n",
    "plt.subplot(223), plt.imshow(gts3, cmap=\"gray\"), plt.axis(\"off\"), plt.title(\"阈值：70\")\n",
    "plt.subplot(224), plt.imshow(gts4, cmap=\"gray\"), plt.axis(\"off\"), plt.title(\"阈值：68\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
